<template>
  <div class="search-todo">
    <a-input-search
      v-model:value.trim="searchText"
      allowClear
      placeholder="What did you forget?"
      @search="$emit('update:searchText', $event)"
    >
      <template v-slot:enterButton>
        <a-button>Search</a-button>
      </template>
    </a-input-search>
  </div>
</template>

<script>
export default {
  props: {
    searchText: {
      type: String,
      default: ''
    }
  },
  emits: ['update:searchText']
}
</script>
